import request from '@/utils/request'

// 查询存储采购信息清单的列表
export function listProcurement(query) {
  return request({
    url: '/procurement/procurement/list',
    method: 'get',
    params: query
  })
}

// 查询存储采购信息清单的详细
export function getProcurement(listId) {
  return request({
    url: '/procurement/procurement/' + listId,
    method: 'get'
  })
}

// 新增存储采购信息清单的
export function addProcurement(data) {
  return request({
    url: '/procurement/procurement',
    method: 'post',
    data: data
  })
}

// 修改存储采购信息清单的
export function updateProcurement(data) {
  return request({
    url: '/procurement/procurement',
    method: 'put',
    data: data
  })
}

// 删除存储采购信息清单的
export function delProcurement(listId) {
  return request({
    url: '/procurement/procurement/' + listId,
    method: 'delete'
  })
}

//获取选项树
export function getTree() {
  return request({
    url: '/procurement/procurement/getTree',
    method: 'get'
  })
}

//根据商品变种id获取变种商品数据
export function getVariantsProduct(id) {
  return request({
    url: '/procurement/procurement/getVariantsProduct/' + id,
    method: 'get'
  })
}
